<?php
function list_unit_kompentensi($kid ){
	$header = array(
		' '=>array('style'=>'border-top:2px solid;border-bottom:2px solid;width:5%'),  
		'Unit kompentensi'=>array('style'=>'border-top:2px solid;border-bottom:2px solid;width:95%'),   
	); 
	$query = "SELECT * FROM  keluarga_jabatan_kompetensi a
	INNER JOIN kompetensi_unit b ON a.kompetensi_unit_id = b.kompetensi_unit_id
	WHERE a.keluarga_jabatan_id ={$kid}";
	$result = my_query($query);
	$i = 0;
	$row=array();
	while($ey = my_fetch_array($result)){
		$i++;
		 
		$row[] = array(
			'#'=> $i, 
			'divisi'=>  $ey['label'] ,     
		);
		 
	}
	
	$datas = table_cetak_rows($row);   
	return  table_cetak_builder($header , $datas ,  2, false );
} 
?>
<style type="text/css">
<!--

	table.page_header {width: 100%; border: none; background-color: #CDCDCD; border-bottom: solid 1mm #000; padding: 2mm }
	table.page_footer {width: 100%; border: none;  border-top: solid 1mm #000; padding: 2mm}
div.zone
{
	border: solid 2mm #66AACC;
	border-radius: 3mm;
	padding: 1mm;
	background-color: #FFEEEE;
	color: #440000;
}
div.zone_over
{
	width: 30mm;
	height: 35mm;
	overflow: hidden;
}

-->
</style>
  
<page style="font-size: 10pt">
	<page_footer>
		<table class="page_footer">
			<tr>
				<td style="width: 33%; text-align: left;">
					Setting Master Data :: HRIS RSKM
				</td>
				<td style="width: 34%; text-align: center">
					page [[page_cu]]/[[page_nb]]
				</td>
				<td style="width: 33%; text-align: right">
					M A P &copy; 2010 - <?php echo date('Y'); ?>
				</td>
			</tr>
		</table>
	</page_footer>
	<div style="width: 100%; text-align:center; padding:2px; font-size: 13pt ;">Detail data keluarga jabatan </div><br>
	
	<?php
	$kel_jabatan = my_get_data_by_id('keluarga_jabatan','keluarga_jabatan_id',$_GET['kid']);
	$datas = array(
		'Keluarga jabatan'=>$kel_jabatan['keluarga_jabatan_label']
	);
	echo detail_rows_cetak($datas).'<br>'; 
	echo list_unit_kompentensi($_GET['kid']);
	?>
</page> 